import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class TelescopeGui extends JFrame {

	private static final long serialVersionUID = 5594562372357211895L;
	private JPanel contentPane;

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TelescopeGui frame = new TelescopeGui();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	public TelescopeGui() {
		setTitle("Telecope tool  v0.1");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);

		JMenuBar menuBar = new JMenuBar();
		setJMenuBar(menuBar);

		JMenu mnNewMenu = new JMenu("File");
		mnNewMenu.setFont(new Font("Segoe UI", Font.PLAIN, 10));
		menuBar.add(mnNewMenu);

		JMenuItem mntmAbout = new JMenuItem("about author");
		mntmAbout.setFont(new Font("Segoe UI", Font.PLAIN, 10));
		mntmAbout.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {

				System.out.println("Menu klikniecie");
			}
		});

		JMenuItem mntmAboutProgram = new JMenuItem("about program");
		mntmAboutProgram.setFont(new Font("Segoe UI", Font.PLAIN, 10));
		mntmAboutProgram.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				System.out.println("Menu klikniecie");
			}
		});
		mnNewMenu.add(mntmAboutProgram);
		mnNewMenu.add(mntmAbout);

		JMenuItem mntmClose = new JMenuItem("close ");
		mntmClose.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {

				System.out.println("Menu klikniecie");
			}
		});
		mntmClose.setFont(new Font("Segoe UI", Font.PLAIN, 10));
		mnNewMenu.add(mntmClose);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
	}

}
